<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            height: 100px;
            width: 100px;
            background-color: red;
            transition: background-color 1s ease;
            color: white;
        }
        .box.active {
            background-color: blue;
            color: red;
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div class="box">hello</div>

    <script>

        var box = document.querySelector('.box');

        function onBoxClick () {
            // box.setAttribute('style', 'background-color: blue; color: red; border-radius: 50%;');
            box.setAttribute('class', 'box active');
        }
        box.addEventListener('click', onBoxClick);

        // 1. 鼠标悬浮变小手 CSS
        // 2. 点击把hello变成world JS
        // 3. 点击把背景变红色 JS
        // 4. box的初始背景设置为红色 CSS
        // 5. box在一秒后自动变成红色 JS
        // 6. 将box从html中移除 JS
        // 7. box初始隐藏 CSS

    </script>
</body>
</html>